"""scm URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url, include
from django.contrib import admin
from apps.crm import views
from django.views.static import serve
from scm.settings import MEDIA_ROOT


urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^$', views.login, name="login"),
    url(r'^index/$', views.index,  name='index'),
    # url(r'^login/$', views.base, {"template_name": "login.html"}, name='login'),
    url(r'^logout/$', views.logout,  name='logout'),
    url(r'^login/$', views.login,  name='login'),
    url(r'^register/$', views.register,  name='register'),
    url(r'^student/', include('apps.student.urls', namespace='student')),
    url(r'^teacher/', include('apps.teacher.urls', namespace='teacher')),
    url(r'^apis/',include('apps.apis.urls', namespace='apis')),
    url(r'^count/',include('apps.count.urls', namespace='count')),
    url(r'^test/', views.test, name='test'),
    url(r'^test_celery/', views.test_celery, name='test_celery'),
    url(r'^test_session/', views.test_session, name='test_session'),
    url(r'^job_count/', views.job_count, name='job_count'),
    url('^media/(?P<path>.*)$',serve,{'document_root':MEDIA_ROOT}),
    # url('^check_info/$', views.check_info, name='check_info')
    url(r'^test_transaction/', views.test_transaction, name='test_transaction'),

]
